package Player;

import GameBoard.GameBoard;
import GameElements.Pawn;
import Player.IAStrategy.IAStrategy;

public class IAPlayer extends Player
{
	private IAStrategy strat;
	
	public IAPlayer(String name, IAStrategy strat)
	{
		this.name = name;
		this.strat = strat;
		this.autonome = true;
		this.id = nbPlayer;
		nbPlayer++;
	}
	
	public Pawn getSelectedPawn(){
		return pawn.get(0);
	}	
	@Override
	public void play(GameBoard board) 
	{
		if(finishedPlaying)//si il a términé son tour précedent
		{
			finishedPlaying = false;
			strat.execute(this, board);
			finishedPlaying = true;
		}
	}	
}
